home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gold Medal Software 2
/
Gold Medal Software Volume 2 (Gold Medal) (1994).iso
/
windows
/
win31
/
macsyma.arj
/
MACSDEMO.EXE
/
CYL2SPH.OUT
< prev
next >
Wrap
Text File
|
1993-09-14
|
2KB
|
29 lines
(c1) /* Conversion of the Laplacian from Cylindrical Coordinates to
Spherical Coordinates */
depends(u,[r,theta,phi])$
(c2) /* Input the transformation rules from the cylindrical system to the
spherical system. */
(gradef(r,z,z/r),
gradef(r,rho,rho/r),
gradef(theta,z,-rho/r^2),
gradef(theta,rho,z/r^2))$
(c3) expop:1$
(c4) /* Now just input the Laplacian in cylindrical coordinates,
and let the chain rule do its thing. */
diff(u,rho,2)+1/rho*diff(u,rho)+1/rho^2*diff(u,phi,2)+diff(u,z,2);
|$label(0,15,Times New Roman,$(d4$))$q($q($sup(d,2)u,d$sup($greektext(q),2))$in( )$sup(z,2),$sup(r,4))$hinge()$in( + )$q($q($sup(d,2)u,d$sup(r,2))$in( )$sup(z,2),$sup(r,2))$hinge()$in( - )$q($q(du,dr)$in( )$sup(z,2),$sup(r,3))$hinge()$in( + )$q($q(du,d$greektext(q))$in( )z,$sup(r,2)$in( )$greektext(r))$hinge()$in( + )$q($sup($greektext(r),2)$in( )$q($sup(d,2)u,d$sup($greektext(q),2)),$sup(r,4))$hinge()$in( + )$q($sup($greektext(r),2)$in( )$q($sup(d,2)u,d$sup(r,2)),$sup(r,2))$hinge()$in( - )$q($sup($greektext(r),2)$in( )$q(du,dr),$sup(r,3))$hinge()$in( + )$q(3$in( )$q(du,dr),r)$hinge()$in( + )$q($q($sup(d,2)u,d$sup($greektext(f),2)),$sup($greektext(r),2))
(c5) subst(r^2-rho^2,z^2,%);
|$label(0,15,Times New Roman,$(d5$))$q($q(du,d$greektext(q))$in( )z,$sup(r,2)$in( )$greektext(r))$hinge()$in( + )$q($q($sup(d,2)u,d$sup($greektext(q),2)),$sup(r,2))$hinge()$in( + )$q($sup(d,2)u,d$sup(r,2))$hinge()$in( + )$q(2$in( )$q(du,dr),r)$hinge()$in( + )$q($q($sup(d,2)u,d$sup($greektext(f),2)),$sup($greektext(r),2))
(c6) subst([z=r*cos(theta),rho=r*sin(theta),
cos(theta)=sin(theta)*cot(theta)],%);
|$label(0,15,Times New Roman,$(d6$))$q($q($sup(d,2)u,d$sup($greektext(q),2)),$sup(r,2))$hinge()$in( + )$q(cot$paren($greektext(q))$in( )$q(du,d$greektext(q)),$sup(r,2))$hinge()$in( + )$q($sup(d,2)u,d$sup(r,2))$hinge()$in( + )$q(2$in( )$q(du,dr),r)$hinge()$in( + )$q($q($sup(d,2)u,d$sup($greektext(f),2)),$sup(r,2)$in( )$sup(sin,2)$paren($greektext(q)))
(c7) /* Clean Up */
(reset(expop), remove([r,theta],[dependency,atomgrad],u,[dependency,special]))$